// 导入请求实例
import request from '@/utils/request'

// 查部门列表
export const getDepartmentListData = () => {
  return request({
    url: '/company/department/',
    method: 'GET'
  })
}

// 查部门信息
export const getDepartmentInfoData = id => {
  return request({
    url: '/company/department/' + id,
    method: 'GET'
  })
}

// 增加部门信息
export const addDepartmentData = data => {
  return request({
    url: '/company/department/',
    method: 'POST',
    data
  })
}

// 修改部门信息
export const editDepartmentData = data => {
  return request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}

// 删除部门信息
export const delDepartmentData = id => {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}
